﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;


public partial class MasterPage : System.Web.UI.MasterPage
{
    protected string Path;

    protected void Page_Load(object sender, EventArgs e)
    {
        
        HtmlGenericControl html = new HtmlGenericControl();
        html.TagName = "Script";
        html.Attributes.Add("type", "text/javascript");
        html.Attributes.Add("src", Request.ApplicationPath + "/Resources/easyUI/jquery-1.4.4.min.js");
        head.Controls.AddAt(0, html);
       
        html = new HtmlGenericControl();
        html.TagName = "Script";
        html.Attributes.Add("type", "text/javascript");

        html.Attributes.Add("src", Request.ApplicationPath + "/Resources/easyUI/jquery.easyui.min.js");
        head.Controls.AddAt(1, html);

        html = new HtmlGenericControl();
        html.TagName = "link";
        html.Attributes.Add("rel", "stylesheet");
        html.Attributes.Add("type", "text/css");
        html.Attributes.Add("href", Request.ApplicationPath + "/Resources/styles/style.css");
        head.Controls.AddAt(2, html);

       

        html = new HtmlGenericControl();
        html.TagName = "link";
        html.Attributes.Add("rel", "stylesheet");
        html.Attributes.Add("type", "text/css");
        html.Attributes.Add("href", Request.ApplicationPath + "/Resources/easyUI/themes/default/easyui.css");
        head.Controls.AddAt(3, html);

        html = new HtmlGenericControl();
        html.TagName = "link";
        html.Attributes.Add("rel", "stylesheet");
        html.Attributes.Add("type", "text/css");
        html.Attributes.Add("href", Request.ApplicationPath + "/Resources/easyUI/themes/icon.css");
        head.Controls.AddAt(4, html);

        html = new HtmlGenericControl();
        html.TagName = "link";
        html.ID= "divdialog";
        html.Attributes.Add("rel", "stylesheet");
        html.Attributes.Add("type", "text/css");
        html.Attributes.Add("href", Request.ApplicationPath + "/resources/styles/divdialog.css");
        head.Controls.AddAt(5, html);


        html = new HtmlGenericControl();
        html.TagName = "Script";
        html.Attributes.Add("type", "text/javascript");

        html.Attributes.Add("src", Request.ApplicationPath + "/JavaScript/common.js");
        head.Controls.AddAt(6, html);
   
        html = new HtmlGenericControl();
        html.TagName = "Script";
        html.Attributes.Add("type", "text/javascript");

        html.Attributes.Add("src", Request.ApplicationPath + "/JavaScript/My97DatePicker/WdatePicker.js");
        head.Controls.AddAt(7, html);
 
        //if (!IsPostBack)
        //{
        //    style.Href = Request.ApplicationPath + style.Href;
        //    divdialog.Href = Request.ApplicationPath + divdialog.Href;
        //}
        //Path = Request.ApplicationPath;
        //header.DataBind();

    }
}
